#include <bits/stdc++.h>
using namespace std;
bool dfs(int x,int *visited,vector<int> *v)
{
    for(auto elem:v[x])
    {
        if(visited[elem] == visited[x])
            return false;
        if(visited[elem] == 0)
        {
            visited[elem] = -visited[x];
            if(!dfs(elem,visited,v))
                return false;
        }
    }
    return true;
}
int main()
{
    int m,n,N;
    cout<<"输入存储元素的最大空间"<<endl;
    scanf("%d",&N);
    vector<int> v[N];
    int *visited = new int[N];
    cout<<"开始构建邻接表:"<<endl;
        scanf("%d%d",&n,&m);
        while(m--)
        {
            int a,b;
            scanf("%d%d",&a,&b);
            v[a].push_back(b);
            v[b].push_back(a);
        }
        memset(visited,0,sizeof(visited));
        bool flag = false;
        //邻接表起点设置为1
        for(int i=1;i<=n;i++)
        {
            if(visited[i]==0)
            {
                visited[i]=1;
                if(!dfs(i,visited,v))
                {
                    flag = true;
                    cout<<"Wrong"<<endl;
                    break;
                }
            }
        }
        if(!flag)
            cout<<"Correct"<<endl;
        delete [] visited;
    return 0;
}
